<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<script type="text/javascript">
			//9. 判断一句话是否以句号结尾。
			let arr=window.prompt("请你输入一句话:");
			let flag = true;
			if(arr.substring(arr.length-1)=='。'){
				console.log("这一句话是以句号结尾");
			}else{
				console.log("这一句话不是以句号结尾");
			}
		</script>
	</body>
</html>